<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <!-- css没写 -->
    <script>
        //1.获取元素
        var btn=document.querySelector('.close-btn');
        var box=document.querySelector('.box0');
        //2.注册事件 程序处理
        btn.onclick=function(){
            box.style.display='none';
        }

    </script>
</body>
</html>